import request from '@/hooks/request'

const Api = {
  addCinema: '/platform/filmCinema/addCinema', // 新增自定义院线
  CinemaList: '/platform/filmCinema/customizeCinemaList', // 院线列表
  delete: '/platform/filmCinema/delCinema', //删除院线
  city: '/film/order/getCityList', //获取城市
  cinema: '/platform/quotation/common/getCinemaList', //获取影院
  relCinema: '/platform/filmCinema/relCinema', //关联影院到院线
  historyList: '/platform/filmCinema/getCinemaRelList', //获取已经关联的数据
}
export const GetHistoryList = (parameter: Record<any, any>) => {
  const formData = new FormData()
  formData.append('lineId', parameter.lineId)
  return request({
    method: 'post',
    url: Api.historyList,
    data: formData,
  })
}
export const RelCinema = (parameter: Record<any, any>) => {
  return request({
    method: 'post',
    url: Api.relCinema,
    data: parameter,
  })
}

export const getCity = () => {
  return request({
    method: 'post',
    url: Api.city,
  })
}
export const GetCinemaList = (parameter: Record<any, any>) => {
  return request({
    method: 'post',
    url: Api.cinema,
    data: parameter,
  })
}

export const AddCinema = (parameter: Record<any, any>) => {
  return request({
    method: 'post',
    url: Api.addCinema,
    data: parameter,
  })
}

export const CinemaList = (parameter: Record<any, any>) => {
  return request({
    method: 'post',
    url: Api.CinemaList,
    data: parameter,
  })
}

export const delCinema = (parameter: Record<any, any>) => {
  return request({
    method: 'post',
    url: Api.delete,
    data: parameter,
  })
}

// export const quotationRuleVerify = (parameter: Record<any, any>) => {
//   const formData = new FormData()
//   formData.append('taskId', parameter.taskId)
//   return request({
//     method: 'post',
//     url: Api.quotationRuleVerify,
//     data: formData,
//   })
// }
